package com.center.biz.impl;

import com.center.api.model.EduUser;
import com.center.api.remote.RemoteEduUserService;
import com.center.biz.dao.EduUserMapper;
import org.apache.dubbo.config.annotation.Service;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.List;

@Service(version = "1.0",interfaceClass = RemoteEduUserService.class)
public class RemoteEduUserServiceImpl implements RemoteEduUserService{

    @Autowired
    private EduUserMapper eduUserMapper;

    @Override
    public int save(EduUser eduUser) {
        return eduUserMapper.insertSelective(eduUser);
    }

    @Override
    public int update(EduUser eduUser) {
        return eduUserMapper.updateByPrimaryKeySelective(eduUser);
    }

    @Override
    public int delete(int id) {
        return eduUserMapper.deleteByPrimaryKey(id);
    }

    @Override
    public List<EduUser> select(EduUser eduUser) {
        return null;
    }

    @Override
    public EduUser getById(int id) {
        return eduUserMapper.selectByPrimaryKey(id);
    }
}
